package org.lys.enumenates;

public enum WeekDay {
	/**
	 * 1.元素列表必须放在枚举类最前面位置
	 * 2.每个枚举元素相当于 一个静态对象
	 */
	MON(2) {
		@Override
		public WeekDay nextDay() {
			return TUE;
		}
	},TUE {
		@Override
		public WeekDay nextDay() {
			return WEN;
		}
	},WEN {
		@Override
		public WeekDay nextDay() {
			return null;
		}
	},THR {
		@Override
		public WeekDay nextDay() {
			return FRI;
		}
	},FRI {
		@Override
		public WeekDay nextDay() {
			return SAT;
		}
	},SAT {
		@Override
		public WeekDay nextDay() {
			return SUN;
		}
	},SUN {
		@Override
		public WeekDay nextDay() {
			return MON;
		}
	};
	
	private WeekDay(){ System.out.println("init()");}
	
	private WeekDay(int day){
		System.out.println("init(n)");
	}
	
	public abstract WeekDay nextDay();
}
